package com.naiterui.ehp.bs.patient.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import com.naiterui.common.repository.page.PageParamVO;

import com.naiterui.common.repository.page.PageVO;
import com.naiterui.ehp.bp.bo.recommend.DrugRemindBO;
import com.naiterui.ehp.bp.bo.recommend.MedicationRecomPaBO;
import com.naiterui.ehp.bp.bo.recommend.PatientDiagnisisBO;
import com.naiterui.ehp.bp.support.config.FeignConfiguration;
import com.naiterui.ehp.bp.support.exception.BusinessException;

/**
 * @author guoyongxiang
 * @date 2019-06-28 15:26
 * @since 1.0.0
 */
@FeignClient(name = "apTuijian", url = "${ehp.domain.tuijian}", configuration = FeignConfiguration.class)
public interface RecomFeginClient {

    /**
     * 患者获取推荐列表
     *
     * @param patientId
     * @param doctorId
     * @param consultId
     * @param page
     * @param num
     * @return
     */
    @PostMapping("inner/pt/recom/drugList")
    PageVO<MedicationRecomPaBO> getRecomDrugList(
            @RequestParam("patientId") Long patientId,
            @RequestParam("doctorId") Long doctorId,
            @RequestParam("consultId") Long consultId,
            @RequestParam("page") Integer page,
            @RequestParam("num") Integer num);


    /**
     * 更新患者诊断信息
     *
     * @param bo
     * @throws BusinessException
     */
    @PostMapping("inner/diagnosis/patient/lastest/update")
    void updateDiagnosis(@RequestBody PatientDiagnisisBO bo) throws BusinessException;

    /**
     * 获取患者处方列表
     *
     * @param patientId
     * @param paramVO
     * @return
     */
    @GetMapping("inner/pt/recom/list")
    PageVO<MedicationRecomPaBO> getPatientRecomList(@RequestParam("patientId") Long patientId,
                                                    @RequestParam("page") Integer page, @RequestParam("num") Integer num, @RequestParam("status") Integer status,
                                                    @RequestParam("type") Integer type);

    /**
     * 获取用药计划信息
     *
     * @param recomId
     * @return
     */
    @GetMapping("inner/assist/drugremind")
    DrugRemindBO drugRemind(@RequestParam("recomId") Long recomId);

    /**
     * 获取处方类型
     * 
     * @param recomId
     * @return
     */
    @GetMapping("inner/recom/getType")
    Integer getRecommendTypeById(@RequestParam("recomId") Long recomId);

}
